<?php

namespace Controller;

class MovieListController{
	//Returnerar lista med användarens filmer
	public function doControll(\Model\Database $db, \Model\UserHandler $userHandler, \Model\MovieHandler $movieHandler){
		
		$userView = new \View\UserView();
                
      	$user = \View\NavigationView::getCurrentUser($userHandler, $db);
		
		$movies = $movieHandler->getAllMovies($user->GetId());
        
        $out = $userView->showMovies($movies);
		
        return $out;
		
		
	}
}
